<div class="panel panel-default panel-intro">
    {:build_heading()}

    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade active in" id="one">
                <div class="widget-body no-padding">
                    <div id="toolbar" class="toolbar">
                        {:build_toolbar('refresh')}
                        <div class="dropdown btn-group">
                            <a class="btn btn-success btn-more dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> {:__('More')}</a>
                            <ul class="dropdown-menu text-left" role="menu">
                                <li><a href="javascript:;" data-toggle="modal" data-target="#batch-generate-modal"><i class="fa fa-qrcode"></i> {:__('批量生成二维码')}</a></li>
                                <li><a href="scanwork/qrcode/stats"><i class="fa fa-bar-chart"></i> {:__('二维码统计')}</a></li>
                            </ul>
                        </div>
                    </div>
                    <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
                           data-operate-edit="false" 
                           data-operate-del="false" 
                           width="100%">
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 批量生成二维码模态框 -->
<div class="modal fade" id="batch-generate-modal" tabindex="-1" role="dialog" aria-labelledby="batchGenerateModalLabel">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="batchGenerateModalLabel">批量生成二维码</h4>
            </div>
            <div class="modal-body">
                <div class="alert alert-info">
                    <i class="fa fa-info-circle"></i> 请选择要生成二维码的任务，系统将为每个任务生成唯一的二维码。
                </div>
                <div id="batch-qr-results" style="display: none;">
                    <!-- 批量生成结果将在这里显示 -->
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" id="batch-generate-btn">生成二维码</button>
            </div>
        </div>
    </div>
</div>

<!-- 单个二维码预览模态框 -->
<div class="modal fade" id="qr-preview-modal" tabindex="-1" role="dialog" aria-labelledby="qrPreviewModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="qrPreviewModalLabel">二维码预览</h4>
            </div>
            <div class="modal-body">
                <div class="text-center">
                    <img id="qr-image" src="" alt="二维码" style="max-width: 100%;">
                    <div class="mt-3">
                        <p><strong>任务信息：</strong></p>
                        <div id="task-info" class="well"></div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-success" id="download-qr-btn">下载二维码</button>
                <button type="button" class="btn btn-primary" id="print-qr-btn">打印标签</button>
            </div>
        </div>
    </div>
</div>

    <script>
        // 页面特定的初始化代码可以在这里添加
        $(document).ready(function() {
            // 二维码管理页面初始化
        });
    </script> 